package com.adcc.swingui.demo.toolbar;

import java.awt.Container;

import javax.swing.AbstractButton;
import javax.swing.ImageIcon;
import javax.swing.JComponent;

import com.adcc.swingui.base.DefaultToolBar;
/**
 * 导航台
 * @author charlie
 *
 */
public class RgsToolBut extends DefaultToolBar {

	private AbstractButton but;
	public RgsToolBut(Container container) {
		super(container);
	}

	@Override
	protected JComponent build() {
		but = createButton(new ImageIcon("res/images/rgs.png"));
		but.setToolTipText("导航台");
		return but;
	}
	
	@Override
	protected void addMouseListener() {
		//这里填写对应响应事件
		but = (AbstractButton)sourceComp;
		//状态设置（业务填写）
		if(but.isSelected()) {
			but.setSelected(false);
		} else {
			but.setSelected(true);
		}
	}

	@Override
	protected void i18n() {
		// TODO Auto-generated method stub
		
	}

}
